﻿//Write a program that creates an array containing all letters from the alphabet (A-Z).
//Read a word from the console and print the index of each of its letters in the array.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _12LetterIndex
{
    class Program
    {
        static void Main(string[] args)
        {
            char[] alphabet = { 'a', 'b', 'c', 'd', 'e', 'f',
                                'g', 'h', 'i', 'j', 'k', 'l',
                                'm', 'n', 'o', 'p', 'q', 'r',
                                's', 't', 'u', 'v', 'w', 'x',
                                'y', 'z'};
            Console.Write("Enter a word:");
            string word = Console.ReadLine();
            for (int i = 0; i <= word.Length - 1; i++)
            {
                for (int j = 0; j <= alphabet.Length - 1; j++)
                {
                    if (word[i] == alphabet[j])
                    {
                        Console.Write("{0} [{1}], ", word[i], j );
                    }
                }
            }

        }
    }
}
